#include "send_panel.h"
#include <QHBoxLayout>
#include <QPushButton>

SendPanel::SendPanel(QWidget *parent) :
	QWidget(parent)
{
	QHBoxLayout *mainLayout;
	QPushButton *pushButton;
	mainLayout = new QHBoxLayout();

	setLayout(mainLayout);
	hexCheckBox = new QCheckBox("Hex");
	mainLayout->addWidget(hexCheckBox);
	dataLineEdit = new QLineEdit();
	mainLayout->addWidget(dataLineEdit);

	pushButton = new QPushButton("send");
	connect(pushButton, SIGNAL(clicked()), this, SLOT(sendDataSlotFunc()));
	mainLayout->addWidget(pushButton);
}

void SendPanel::sendDataSlotFunc()
{
	dataByteArray.clear();
	if(hexCheckBox->isChecked())
	{

	}
	emit sendData(dataByteArray);
}
